<article class="post bg-white">
  <header class="post-header">
    <h1 class="post-title">
      {{ if .Params.weight }}
        <span class="post-pinned">
          {{ partial "svg/pinned.svg" }}
        </span>
      {{ end }}
      <a class="post-link" href="{{ .RelPermalink }}">{{ .Title }}</a>
    </h1>
    {{ partial "post/i18nlist.html" . }}
    <div class="post-meta">
      <time datetime="{{ .Date.Format "2006-01-02" }}" class="post-time">
        {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}
      </time>
      {{ with .Params.categories -}}
        <div class="post-category">
          {{ range . }}
          {{- $name := . -}}
          {{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}}
            <a href="{{ .Permalink }}"> {{ $name }} </a>
          {{ end -}}
          {{ end }}
        </div>
      {{- end }}
      {{ if .Site.Params.moreMeta -}}
      <span class="more-meta"> {{ i18n "wordCount" .WordCount }} </span>
      <span class="more-meta"> {{ i18n "readingTime" .ReadingTime }} </span>
        {{ if .Site.Params.commentCount.disqus.enable }}
        <span class="more-meta"> <a href="{{ .Permalink }}#disqus_thread">{{ i18n "comments" }}</a> </span>
        {{ end }}
        {{ if .Site.Params.commentCount.remark42.enable }}
        <span class="more-meta"><span
         class="remark42__counter"
         data-url="{{ .Permalink }}"
        ></span></span> {{ i18n "comments" }}
        {{ end }}
      {{- end }}
      <!-- Counter leancloud -->
      {{ if .Site.Params.counter.leancloud.enable }}
        <span id="{{ .RelPermalink }}" class="leancloud_visitors" data-flag-title="{{ .Title }}">
          <span class="post-meta-item-text"> | 阅读 </span>
          <span class="leancloud-visitors-count"></span>
        </span>
      {{ end }}
    </div>
  </header>
  <!-- Content -->
  <div class="post-content">
    {{ if .Site.Params.homeFullContent }}
    <div class="post-summary">
      {{ .Content }}
    </div>
    {{ else }}
    <div class="post-summary">
      {{ .Summary }}
    </div>
    <div class="read-more">
      <a href="{{ .RelPermalink }}" class="read-more-link">{{ i18n "readmore" }}</a>
    </div>
    {{ end }}
  </div>
</article>
